package com.etc.service.impl;

import com.etc.dao.DeviceDao;
import com.etc.entity.Device;
import com.etc.service.DeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class DeviceServiceImpl implements DeviceService {
    @Autowired
    private DeviceDao deviceDao;
    @Override
    public List<Device> findAll() {
        return deviceDao.findAll();
    }

    @Override
    public List<Device> findByPark(Integer id) {
        return deviceDao.findByPark(id);
    }

    @Override
    public List<Device> findByBuilding(Integer id) {
        return deviceDao.findByBuilding(id);
    }

    @Override
    public List<Device> findByAnyCondition(Map<String, Object> map) {
        return deviceDao.findByAnyCondition(map);
    }

    @Override
    public Device findById(Integer id) {
        return deviceDao.findById(id);
    }

    @Override
    public List<Device> findByStatus(Integer status) {
        return deviceDao.findByStatus(status);
    }
}
